From: Benjamin Otte Date: Sat, 25 Dec 2021 13:46:07 +0000 (+0100) Subject: gles: glGetTexLevelParameter() isn't supported X-Git-Tag: archive/raspbian/4.6.5+ds-1+rpi1~1^2~91^2^2~15^2~1 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=5803dd765dcc1584d09e1e5e7d7d635e40e63347;p=gtk4.git gles: glGetTexLevelParameter() isn't supported --- diff --git a/gdk/gdkgltexture.c b/gdk/gdkgltexture.c index 867fd538cd..a1c75a62fd 100644 --- a/gdk/gdkgltexture.c +++ b/gdk/gdkgltexture.c @@ -21,6 +21,7 @@ #include "gdkgltextureprivate.h" #include "gdkdisplayprivate.h" +#include "gdkglcontextprivate.h" #include "gdkmemoryformatprivate.h" #include "gdkmemorytextureprivate.h" #include "gdktextureprivate.h" @@ -305,9 +306,11 @@ gdk_gl_texture_determine_format (GdkGLTexture *self) GLint active_texture; GLint internal_format; - if (self->context != gdk_gl_context_get_current ()) + /* Abort if somebody else is GL-ing here... */ + if (self->context != gdk_gl_context_get_current () || + /* ... or glGetTexLevelParameter() isn't supported */ + !gdk_gl_context_check_version (self->context, 0, 0, 3, 1)) { - /* Somebody else is GL-ing here, abort! */ texture->format = GDK_MEMORY_DEFAULT; return; }